<template>

  <div class="app-container">
    


      <el-form ref="dataForm" :model="create_form" label-width="120px">
        <el-form-item label="客户姓名" style="width:500px;margin-top:8px"">
          <el-input v-model="create_form.real_name" type="text" />
        </el-form-item>
        <el-form-item label="车辆状态" style="width: 500px">
            <el-select v-model="create_form.car_status" placeholder="车辆状态" style="width: 300px" >
              <el-option
                v-for="item in type_list.car_status"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="车辆回收日期">
            <el-date-picker v-model="create_form.car_back_date" style="width:180px;" format="yyyy-MM-dd" type="datetime" placeholder="车辆回收日期" />
          </el-form-item>
          <el-form-item label="结清金额" style="width:500px;margin-top:8px"">
            <el-input v-model="create_form.real_name" type="number" />
          </el-form-item>
          <el-form-item label="结清类型" style="width: 500px">
            <el-select v-model="create_form.settle_type" placeholder="结清类型" style="width: 300px" >
              <el-option
                v-for="item in type_list.settle_type"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              />
            </el-select>
          </el-form-item>
          <el-card class="box-card">
            <el-form-item label="费用类型" style="width: 500px">
              <el-select v-model="create_form.money_type" placeholder="费用类型" style="width: 300px" >
                <el-option
                  v-for="item in type_list.money_type"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="报销金额" style="width:500px;margin-top:8px"">
              <el-input v-model="create_form.settle_money" type="number" />
            </el-form-item>
          </el-card>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="doSubmit(2)">确 定</el-button>
      </span>

  </div>
</template>

<script>

import {
  getManagerType
} from '@/api/manager'
  import {
    formatDate
  } from '@/utils/formatDate.js'
  import waves from '@/directive/waves' // waves directive
  import company from '@/components/company/company.vue'
  import {
    parseTime
  } from '@/utils'
  import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  export default {
    name: 'BalanceTable',
    components: {
      Pagination,company
    },
    directives: {
      waves
    },
    filters: {
      formatDate(time) {
        time = time * 1000
        let date = new Date(time)
        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
      }
    },
    data() {
      return {
        createlAble:false,
        create_form:{},
        tableKey: 0,
        list: [],
        total: 0,
        listLoading: true,
        listQuery: {
          page: 1,
          limit: 20
        },
        type_list:[],
      }
    },
    created() {
      this.listLoading=false
      this.getList()
    },
    methods: {
      create(){
        this.createlAble = true;
        getManagerType(this.listQuery).then(response => {
          this.type_list = response.data
        })
      },
      doSubmit(){

      },
      handleFilter() {
        const c_id = this.$refs.companys.$data.listQuery.c_id
        this.listQuery.c_id = c_id
        this.listQuery.page = 1
        this.getList()
      },
      getList() {
        this.listLoading = true
        getLoginLogList(this.listQuery).then(response => {
          this.list = response.data.data
          this.total = response.data.total
          setTimeout(() => {
            this.listLoading = false
          }, 1.0 * 1000)
        })
      }
    }
  }
</script>

<style>
</style>
